An inverter device for driving a motor such as an induction motor and a synchronous motor generally includes an output-voltage calculating unit that calculates an output voltage command in each calculation period, based on a frequency command value input to drive a motor and a state quantity of the motor detected; a PWM-pattern generating unit that outputs a PWM (pulse-width modulation) signal based on a comparison between an output-voltage command value output by the output-voltage calculating unit and a triangular wave signal; and a switching unit that switches a direct voltage according to the PWM signal output by the PWM-pattern generating unit and supplies an alternating voltage with a predetermined frequency to the motor. However, the waveform of the alternating voltage output by the switching unit becomes a staircase pattern, and hence, for the purpose of reducing current ripple or the like, various devices are proposed so as to allow the waveform of an output voltage to approach a sine wave as close as possible.
For example, Japanese Patent Application Laid-Open No. H6-22556 discloses a technology of obtaining a smooth output voltage by dividing a difference ΔV, between an output-voltage command value V1 calculated in one calculation period and an output-voltage command value V2 calculated in the next one calculation period, by the number N of vertices of a triangular wave signal included in one calculation period, and by linearly complementing and changing an amplitude value of each of the output-voltage command values, by ΔV/N each, at each vertex of the triangular wave signal included in the calculation period, to thereby change the output-voltage command value from a staircase pattern to a linear pattern.
Japanese Patent Application Laid-Open No. H6-22556
In the above technology however, a code indicating a direction of voltage change in one calculation period is fixed. Therefore, as shown in FIG. 1, if the direction of voltage change is reversed in the middle of the one calculation period, an output-voltage command value indicating such a change cannot be obtained. This case is specifically explained with reference to FIG. 1. FIG. 1 is a diagram of the comparison between a changing waveform of an output voltage command that is desired to actually output and a changing waveform of an output voltage command that is actually output.
FIG. 1(1) illustrates a correlation between a changing waveform 1 of the output voltage command that is desired to actually output and a triangular wave signal 2 in one calculation period. FIG. 1(2) illustrates a correlation between a changing waveform 3 of the output voltage command that is actually output and the triangular wave signal 2 in one calculation period. As shown in FIG. 1, an amplitude value of the output voltage command in one calculation period is changing by each ΔV/N at each vertex of the triangular wave signal 2.
When vertices (e.g., a maximum value point on the positive side) of the sine wave are included in one calculation period as shown in FIG. 1(1), the changing waveform 1 of the output voltage command, which is actually desired to be output, becomes a staircase waveform in which an upward staircase is followed by a downward staircase portion 4 in the one calculation period. On the contrary, in the technology described in the Japanese Patent Application Laid-Open No. H6-22556, because the direction of voltage change is one direction in the one calculation period as shown in FIG. 1(2), the changing waveform 2 of the output voltage command, which is actually output, is only an upward staircase pattern. Therefore, the changing waveform 2 becomes a waveform of the upward staircase in an area 5 corresponding to the downward staircase portion 4 in the changing waveform 1 of the output voltage command, which is actually desired to be output as shown in FIG. 1(1).
To avoid this pattern, an area divided by a dotted line needs to be reduced by one portion so that the downward staircase portion 4 of FIG. 1(1) is included in the next calculation period, namely, the calculation period is shortened. Alternatively, the calculation period needs to coincide with the phase of the sine wave by shifting the phase of the sine wave to the right as the whole. To implement this, in the former case, a CPU that calculates an output voltage command needs to be upgraded, which causes an increase in cost. In the latter case, the processing load increases.
FIG. 2 is a diagram of the comparison between an output voltage waveform and a sine waveform. FIG. 2 illustrates a waveform of an output voltage 8 when ¼ cycle of a sine wave 7 is set to one calculation period. As shown in FIG. 2, a voltage between calculation periods is obtained by linear complement. Therefore, the output voltage 8 is output as a voltage that linearly changes between calculation periods. At this time, if an output frequency is low, the calculation period with respect to the cycle of the sine wave becomes sufficiently short, which allows the sine wave to be divided into fine intervals. Therefore, deviation from the sine wave is small even by the linear complement, but if the output frequency is high, the calculation period becomes comparatively long. Therefore, in the conventional technology, it becomes difficult to approximate a fine curve of the sine wave, which causes the deviation from the sine wave to become significant.
The present invention has been achieved in view of the above problems, and it is an object of the present invention to obtain an inverter device capable of approaching the waveform of an output voltage closer to a sine wave irrespective of whether output frequency is high or low, as compared with the conventional technology, and of reducing the processing load of a CPU that calculates an output voltage command.